package cn.gok.jwtdemo.service;

import cn.gok.jwtdemo.entity.User;
import org.springframework.stereotype.Service;

/**
 * @author: chen fan
 * @since: 2022/11/23 11:10
 * @description:
 */
@Service
public class UserService {

    public User login(String userName,String password){
        if ("zhangsan".equals(userName) && "123456".equals(password)){
                return new User(1001,"zhangsan","",new String[]{"role1","role2"},19);
        }
        return null;
    }

    public int updateUser(User user){
        System.out.println("修用户信息");
        return 1;
    }
}
